<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Links</title>
</h:head>
<h:body>
	<ui:composition template="/WEB-INF/templates/template.xhtml">
		<ui:define name="title">
		Links
	</ui:define>
		<ui:define name="content">
			<h:form>
				<table>
					<tr>
						<td><h:outputLabel for="link" value="URL eingeben" /></td>
						<td><p:inputText id="link" value="#{linkBean.syncUrl}" /></td>
					</tr>
					<tr>
						<td rowspan="2"><p:commandButton id="save"
								value="Synchronisieren" action="#{linkBean.synchronize}"
								ajax="false" /></td>
					</tr>
				</table>
			</h:form>
			<h:form>
				<p:growl id="growl" />
				<!-- Liste der Links: Anzeige der erfassten Links -->
				<p:dataTable id="users" value="#{linkBean.allLinks}"
					var="linkBeanLink">

					<!-- Kopfbereich: Name der Liste -->
					<f:facet name="header">
							Erfasste Links
						</f:facet>
					<!-- Kolonne 1: Link -->
					<p:column ajax="true" immediate="true">
						<f:facet name="header">
							<h:outputText value="Link" />
						</f:facet>
						<h:outputLink value="#{linkBeanLink.linktext}">#{linkBeanLink.linktext}</h:outputLink>
					</p:column>
					<!-- Kolonne 2: Link Beschreibung -->
					<p:column ajax="true" immediate="true">
						<f:facet name="header">
							<h:outputText value="Beschreibung" />
						</f:facet>
						<h:outputText value="#{linkBeanLink.description}" />
					</p:column>
				</p:dataTable>
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>